package com.example.treasure_back.controller;

import com.example.treasure_back.entity.MsgEntity;
import com.example.treasure_back.model.AcknowledgeModel;
import com.example.treasure_back.service.AcknowledgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/treasure/acknowledge")
public class AcknowledgeController {

    @Autowired
    private AcknowledgeService acknowledgeService;

    @RequestMapping("/getAllItems")
    public MsgEntity getAllItems(){
        List<AcknowledgeModel> allItems = acknowledgeService.getAllItems();
        return new MsgEntity("SUCCESS","200",allItems);
    }

}
